package com.example.springbootgraduation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.springbootgraduation.entity.LineTrend;
import com.example.springbootgraduation.mapper.IndexMapper;
import com.example.springbootgraduation.entity.NocvData;
import com.example.springbootgraduation.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//index 接口实现类
@Service
public class IndexServiceImpl extends ServiceImpl<IndexMapper,NocvData> implements IndexService {//继承ServiceImpl与IndexService方法

    @Autowired
    private IndexMapper indexMapper;

    @Override
    public List<LineTrend> findSevenData() {
        List<LineTrend> list = indexMapper.findSevenData();
        return list;//返回list，七天数据
    }//查询近七天所有的数据（折线图）

    @Override
    public List<NocvData> listOrderByIdLimit34() {
        return indexMapper.listOrderByIdLimit34();
    }
}
